package day12;

public class AccountAdmin {
	private int accountNumber;
	private double  balance;
	
	public void withDraw(double amount)throws InsuficientFoundsException{
		if (amount <= balance) {
			balance -= amount;
		}else{
			double need = balance - amount;
			throw new InsuficientFoundsException(need);
			}
	}
	
	public void deposit(double amount ) {
		balance += amount;
	}
	
	public AccountAdmin(int accountNumber) {
		super();
		this.accountNumber = accountNumber;
	}

	public int getAccountNumber() {
		return accountNumber;
	}
	public void setAccountNumber(int accountNumber) {
		this.accountNumber = accountNumber;
	}
	public double getBalance() {
		return balance;
	}
	public void setBalance(double balance) {
		this.balance = balance;
	}
	
}
